home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / PlayTrackInfoThang.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-05  |  2.7 KB  |  81 lines  |  [TEXT/KAHL]

  1. /* PlayTrackInfoThang.h */
  2.  
  3. #ifndef Included_PlayTrackInfoThang_h
  4. #define Included_PlayTrackInfoThang_h
  5.  
  6. /* PlayTrackInfoThang module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* FixedPoint */
  12. /* BinaryCodedDecimal */
  13. /* Array */
  14. /* Memory */
  15. /* OscBankPlayer */
  16. /* TrackObject */
  17. /* IncrementalParameterUpdator */
  18. /* Fractions */
  19. /* FrameObject */
  20. /* DeterminedNoteStructure */
  21. /* NoteObject */
  22. /* ErrorDaemon */
  23. /* TrackEffectGenerator */
  24. /* InstrumentStructure */
  25.  
  26. #include "FixedPoint.h"
  27. #include "BinaryCodedDecimal.h"
  28.  
  29. struct PlayTrackInfoRec;
  30. typedef struct PlayTrackInfoRec PlayTrackInfoRec;
  31.  
  32. /* this module keeps track of all the information for playing one track. */
  33.  
  34. /* forwards */
  35. struct TrackObjectRec;
  36. struct InstrumentRec;
  37. struct FractionRec;
  38. struct TempoControlRec;
  39. struct ErrorDaemonRec;
  40. struct MainWindowRec;
  41. struct TrackEffectGenRec;
  42.  
  43. /* this number is the number of duration update pulses that occur in every whole note. */
  44. #define DURATIONUPDATECLOCKRESOLUTION (64L*2L*3L*5L*7L)
  45.  
  46. /* dispose of cached track data structures */
  47. void                                FlushPlayTrackInfo(void);
  48.  
  49. /* create a new track play info thing and set a bunch of parameters.  this also */
  50. /* builds the internal representations for instruments & oscillators for this track. */
  51. PlayTrackInfoRec*        NewPlayTrackInfo(struct TrackObjectRec* TheTrack,
  52.                                             struct InstrumentRec* InstrumentSpecification,
  53.                                             MyBoolean StereoFlag, LargeBCDType OverallVolumeScalingReciprocal,
  54.                                             long SamplingRate, float EnvelopeRate, MyBoolean TimeInterp,
  55.                                             MyBoolean WaveInterp, struct TempoControlRec* TempoControl,
  56.                                             long ScanningGapWidthInEnvelopeTicks,
  57.                                             struct ErrorDaemonRec* ErrorDaemon,
  58.                                             struct MainWindowRec* MainWindow,
  59.                                             struct TrackEffectGenRec* ScoreEffectGenerator);
  60.  
  61. /* dump a track play info thing and all the stuff in it */
  62. void                                DisposePlayTrackInfo(PlayTrackInfoRec* TrackInfo);
  63.  
  64. /* cue track forward to the specified point.  returns False if it fails */
  65. MyBoolean                        CuePlayTrackInfoToPoint(PlayTrackInfoRec* TrackInfo,
  66.                                             struct FractionRec* StartTime);
  67.  
  68. /* check to see if the track has finished and can be dropped. */
  69. MyBoolean                        PlayTrackIsItStillActive(PlayTrackInfoRec* TrackInfo);
  70.  
  71. /* perform one envelope clock cycle update.  if UpdateEnvelopes is true, then */
  72. /* wave data should be generated and envelopes should be updated, otherwise only */
  73. /* note scheduling should be performed. */
  74. MyBoolean                        PlayTrackUpdate(PlayTrackInfoRec* TrackInfo,
  75.                                             MyBoolean UpdateEnvelopes, long NumDurationTicks,
  76.                                             long NumFrames, largefixedsigned* OutputData,
  77.                                             float EnvelopeTicksPerDurationTick,
  78.                                             long ScanningGapFrontInEnvelopeTicks);
  79.  
  80. #endif
  81.